package com.dream.inspect.modules.business.service;

import com.baomidou.mybatisplus.service.IService;
import com.dream.inspect.common.utils.PageUtils;
import com.dream.inspect.modules.business.entity.SuperviseStandardEntity;

import java.util.List;
import java.util.Map;

/**
 * 督察问题标准表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-06-16 17:04:52
 */
public interface SuperviseStandardService extends IService<SuperviseStandardEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询所有
     *
     * @return
     */
    List<SuperviseStandardEntity> findAllDesc();

    /**
     * 查询一级问题
     *
     * @param params
     * @return
     */
    List<SuperviseStandardEntity> findStandardType(Map<String, Object> params);

    /**
     * 根据 父代码 级别 名称查询
     *
     * @param code
     * @param level
     * @param name
     * @return
     */
    List<Map<String, Object>> getListByCode(String code, String level, String name);

    /**
     * 查询督查问题
     *
     * @param params
     * @return
     */
    List<SuperviseStandardEntity> findListByCodeAndLevel(Map<String, Object> params);

    /**
     * 查询所有问题-树
     * @return
     */
    List<SuperviseStandardEntity> findAllListTree();
    /**
     * 查询督查问题
     *
     * @return
     */
    List<SuperviseStandardEntity> findAllList();

    /**
     * 查询督查问题 根据父id
     *
     * @return
     */
    List<SuperviseStandardEntity> findStandardListByParentId(Map<String, Object> params);

    /**
     * 新增前获取下一个信息
     *
     * @param params
     * @return
     */
    Map<String, Object> findNextInfo(Map<String, Object> params);

    /**
     * 新增
     *
     * @param superviseStandardEntity
     */
    void addEntity(SuperviseStandardEntity superviseStandardEntity);

    /**
     * 获取问题统计
     *
     * @param param
     * @return
     */
    public Map<String, Object> getQuestionCount(Map<String, Object> param);


    PageUtils findQuestionList(Map<String, Object> params);

}

